package com.guocheng.controller;

import com.guocheng.model.dto.GoodInfoDto;
import com.guocheng.service.GoodService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

@Controller
public class GoodsController {
    @Autowired
    private GoodService goodService;

    @GetMapping("/hello/{id}")
    @ResponseBody
    public String hello(@PathVariable Integer id){
        GoodInfoDto goodInfo = goodService.findGoodInfo(id);
        System.out.println(goodInfo);
        return "123456";
    }
}
